package entity;

public class Order {
    private Integer oid;

    private Integer userId;

    private String ordernum;

    private Double totalPrice;

    private String orderTime;

    private String sendTime;

    private String orderStatus;

    public Order() {
    }

    public Order(Integer oid, Integer userId,  Double totalPrice, String orderTime,  String orderStatus) {
        this.oid = oid;
        this.userId = userId;
        this.totalPrice = totalPrice;
        this.orderTime = orderTime;
        this.orderStatus = orderStatus;
    }

    public Integer getOid() {
        return oid;
    }

    public void setOid(Integer oid) {
        this.oid = oid;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getOrdernum() {
        return ordernum;
    }

    public void setOrdernum(String ordernum) {
        this.ordernum = ordernum == null ? null : ordernum.trim();
    }

    public Double getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(Double totalPrice) {
        this.totalPrice = totalPrice;
    }

    public String getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(String orderTime) {
        this.orderTime = orderTime == null ? null : orderTime.trim();
    }

    public String getSendTime() {
        return sendTime;
    }

    public void setSendTime(String sendTime) {
        this.sendTime = sendTime == null ? null : sendTime.trim();
    }

    public String getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(String orderStatus) {
        this.orderStatus = orderStatus == null ? null : orderStatus.trim();
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", oid=").append(oid);
        sb.append(", userId=").append(userId);
        sb.append(", ordernum=").append(ordernum);
        sb.append(", totalPrice=").append(totalPrice);
        sb.append(", orderTime=").append(orderTime);
        sb.append(", sendTime=").append(sendTime);
        sb.append(", orderStatus=").append(orderStatus);
        sb.append("]");
        return sb.toString();
    }
}